package home1ess.passport.pojo.param;

import lombok.Data;
import lombok.experimental.FieldDefaults;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data//^1[3456789]\d{9}$
@FieldDefaults(level = lombok.AccessLevel.PRIVATE)
public class UserRegParam implements Serializable {
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3456789]\\d{9}$", message = "手机号格式错误")
    String phoneNumber;

    String nickname;


    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9]{6,15}$",message = "密码由大小写字母和数字组成，并且长度在 6 到 20 个字符之间")
    String password;
}
